<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/style/style_news.css" rel="stylesheet" type="text/css" />
<div class="w_960 o_a">
	<?php $this->renderPartial('/news/sidebar_nav',array('id'=>$id));?>
    <div class="news_grid_01 c_f mt10 bg_fff">
    	<!--轮播 start-->
        <div id="slideBoxs" class="slideBoxs f_l">
			<div class="hd">
				<ul>
				<?php foreach($news_positions as $key=>$row):?>
					<li class=" "><?php echo $key+1?></li>
				<?php endforeach;?>
				</ul>
			</div>
			<div class="bd">
				<ul>
					<?php foreach($news_positions as $row):?>
					<li>
                    	<?php echo CHtml::link(Tool::thumb($row->zpl_pic,310,250,$row->zpl_title), array('/home/news/detail', 'id'=>$row->zpl_content_id), array('target'=>'_blank'));?>
                        <div class="mask"></div>
                        <div class="txt fs_14 fw_b"><?php echo $row->zpl_title;?></div>
                   	</li>
					<?php endforeach;?>
				</ul>
			</div>
		</div>
		<script type="text/javascript" src="/js/jQuery.blockUI.js"></script>
		<script type="text/javascript" src="/js/jquery.SuperSlide.js"></script>
        <script type="text/javascript">
       		 jQuery(".slideBoxs").slide( { mainCell:".bd ul",effect:"left",autoPlay:true} );
		</script>
        <!--轮播 end-->
        <!--推荐资讯 start-->
        <div class="hot_news f_l">
        	<div class="topnews">
			<?php $news_f = array_shift($news_all);?>
            	<h3 class="fs_18 ff_yh"><?php echo CHtml::link($news_f->zne_short, array('/home/news/detail', 'id'=>$news_f->zne_id), array('class'=>'c_blue3', 'target'=>'_blank'));?></h3>
                <p class="c_999 ff_s"><?php echo $news_f->zne_desc;?></p>
            </div>
            <ul class="other_list">
				<?php 
					foreach($news_all as $index=>$val){ 
					switch ($val->newscat->znc_patentid)
					{
					case 7:
					  $url = '/home/news/album';
					  $url2 = '/home/news/album_detail/id/'.$val->zne_id;
					  break;
					case 6:
					  $url = '/home/news/video_list/id/'.$val->znc_id;
					  $url2 = '/home/news/video_detail/id/'.$val->zne_id;
					  break;
					default:
						$url = '/home/news/list/id/'.$val->znc_id;
						$url2 = '/home/news/detail/id/'.$val->zne_id;
					}
					if($val->znc_id == 9){$url = '/home/news/special';}
				?>
            	<li><span class="time f_r c_999"><?php echo date('m/d', $val->inputtime);?></span><span class="c_blue3 sort">[<?php echo CHtml::link($val->newscat->znc_title, $url, array('class'=>'c_blue3', 'target'=>'_blank'));?>]</span><?php echo CHtml::link($val->zne_short, $url2, array('target'=>'_blank'));?></li>
				<?php };?>
			</ul>
        </div>
        <!--推荐资讯 end-->
        <!--动态 start-->
        <div class="grid_01_r f_r">
            <div class="news_tab " id="newsTab">
                <div class="tab_hd">
                    <ul class="c_f fs_14">
						<li><?php echo CHtml::link('家猫动态', array('/home/news/list', 'id'=>5));?></li>
						<li><?php echo CHtml::link('硅胶知识', array('/home/news/list', 'id'=>4));?></li>
                    </ul>
                </div>
                <div class="tab_cont">
                	<?php $this->widget('ext.NewsBlockWidget', array(
								'znc_id'=>5, 
								'limit'=>5, 
								'banner'=>0,
								'ulclass'=>'news_li', 
								'showDate'=>true,
								'offset'=>0,
							)); ?>
                </div>
                <div class="tab_cont">
					<?php $this->widget('ext.NewsBlockWidget', array(
								'znc_id'=>4, 
								'limit'=>5, 
								'banner'=>0,
								'ulclass'=>'news_li', 
								'showDate'=>true,
								'offset'=>0,
							)); ?>
                </div>
            </div>
<!--            广告位 家猫动态栏目下A1 start-->
            <div class="ad mt10">
                <?php $adzone = Adzone::model()->getData(60,$cid=0);
                    foreach( (array)$adzone['ads'] as $key=>$value){?>
                    <?php echo CHtml::link(CHtml::image($value['zds_file_url'],$value['zds_desc'],array('height'=>$adzone['zdz_height'],'width'=>$adzone['zdz_width'])),$value['zds_url'],array('target'=>'_blank'))?>
                <?php }?>
            </div>
<!--            广告位 end-->
        </div>
        <!--动态 end-->
    </div>
    <div class="news_grid_02 c_f">
    	<!--分类资讯 start-->
        <div class="col_main f_l w_700">
        	<div class="sort_news bg_fff c_f mt10">
            	<div class="list f_l border_r">
                	<div class="hd c_f"><?php echo CHtml::link('更多>>', array('/home/news/list', 'id'=>29), array('class' => 'more_txt f_r c_666'));?><h2 class="c_666 ff_yh fs_16">居家日用</h2></div>
                    <div class="bd">
						<?php $this->widget('ext.NewsBlockWidget', array(
							'znc_id'=>29, 
							'limit'=>5, 
							'banner'=>1,
							'ulclass'=>'news_li', 
							'showDate'=>true,
							'offset'=>0,
						)); ?>
                    </div>
                </div>
                <div class="list f_l">
                	<div class="hd c_f"><?php echo CHtml::link('更多>>', array('/home/news/list', 'id'=>30), array('class' => 'more_txt f_r c_666'));?><h2 class="c_666 ff_yh fs_16">母婴用品</h2></div>
                    <div class="bd">
                    	<?php $this->widget('ext.NewsBlockWidget', array(
							'znc_id'=>30, 
							'limit'=>5, 
							'banner'=>1, 
							'ulclass'=>'news_li', 
							'showDate'=>true,
							'offset'=>0,
						)); ?>
                    </div>
                </div>
            </div>
            <div class="sort_news bg_fff c_f mt10">
            	<div class="list f_l border_r">
                	<div class="hd c_f"><?php echo CHtml::link('更多>>', array('/home/news/list', 'id'=>31), array('class' => 'more_txt f_r c_666'));?><h2 class="c_666 ff_yh fs_16">运动户外</h2></div>
                    <div class="bd">
                        <?php $this->widget('ext.NewsBlockWidget', array(
							'znc_id'=>31, 
							'limit'=>5, 
							'banner'=>1,
							'ulclass'=>'news_li', 
							'showDate'=>true,
							'offset'=>0,
						)); ?>
                    </div>
                </div>
                <div class="list f_l">
                	<div class="hd c_f"><?php echo CHtml::link('更多>>', array('/home/news/list', 'id'=>32), array('class' => 'more_txt f_r c_666'));?><h2 class="c_666 ff_yh fs_16">文化娱乐</h2></div>
                    <div class="bd">
                        <?php $this->widget('ext.NewsBlockWidget', array(
							'znc_id'=>32, 
							'limit'=>5, 
							'banner'=>1,
							'ulclass'=>'news_li', 
							'showDate'=>true,
							'offset'=>0,
						)); ?>
                    </div>
                </div>
            </div>
            <div class="sort_news bg_fff c_f mt10">
            	<div class="list f_l border_r">
                	<div class="hd c_f"><?php echo CHtml::link('更多>>', array('/home/news/list', 'id'=>33), array('class' => 'more_txt f_r c_666'));?><h2 class="c_666 ff_yh fs_16">汽车用户</h2></div>
                    <div class="bd">
                       <?php $this->widget('ext.NewsBlockWidget', array(
							'znc_id'=>33, 
							'limit'=>5, 
							'banner'=>1,
							'ulclass'=>'news_li', 
							'showDate'=>true,
							'offset'=>0,
						)); ?>
                    </div>
                </div>
                <div class="list f_l">
                	<div class="hd c_f"><?php echo CHtml::link('更多>>', array('/home/news/list', 'id'=>34), array('class' => 'more_txt f_r c_666'));?><h2 class="c_666 ff_yh fs_16">数码配饰</h2></div>
                    <div class="bd">
                       <?php $this->widget('ext.NewsBlockWidget', array(
							'znc_id'=>34, 
							'limit'=>5, 
							'banner'=>1,
							'ulclass'=>'news_li', 
							'showDate'=>true,
							'offset'=>0,
						)); ?>
                    </div>
                </div>
            </div>
        </div>
        <!--分类资讯 end-->
        <!--精彩专题/视频 start-->
        <div class="col_sub w_250 f_r mt10">
        	<div class="hot_topics bg_fff">
            	<div class="hd c_f"><?php echo CHtml::link('更多>>', array('/home/news/special'), array('class' => 'more_txt f_r c_666'));?><h2 class="c_666 ff_yh fs_16">精彩专题</h2></div>
                <div class="bd">
                	<ul class="img c_f">
                        <?php foreach($subject_commend as $row):?>
                            <li>
                                <div class="c_img"><?php echo CHtml::link(Tool::thumb($row->zne_thumb,115,125, $row->zne_short), array('/home/news/detail', 'id'=>$row->zne_id), array('target'=>'_blank'))?></div>
                                <p class="mask"></p>
                                <p class="txt c_white"><?php echo $row->zne_short;?></p>
                            </li>
                        <?php  endforeach;?>
                    </ul>
                    <ul class="news_li">
                        <?php foreach($subject as $row):?>
                    	    <li><?php echo CHtml::link($row->zne_short,array('/home/news/detail', 'id'=>$row->zne_id));?></li>
                        <?php  endforeach;?>
					</ul>
                </div>
            </div>
            <div class="ad mt10">
			<!-- 精彩专题栏目下B2 广告位  250*80 start -->
				<?php $adzone = Adzone::model()->getData(61,$cid=0);
                    foreach( (array)$adzone['ads'] as $key=>$value){?>
                    <?php echo CHtml::link(CHtml::image($value['zds_file_url'],$value['zdz_desc'],array('height'=>$adzone['zdz_height'],'width'=>$adzone['zdz_width'])),$value['zds_url'],array('target'=>'_blank'))?>
                <?php }?>
			<!-- 广告位 end -->
			</div>	
            <div class="wond_video bg_fff mt10">
            	<div class="hd c_f"><?php echo CHtml::link('更多>>', array('/home/news/video'), array('class' => 'more_txt f_r c_666'));?><h2 class="c_666 ff_yh fs_16">精彩视频</h2></div>
                <div class="bd">
                	<ul class="img c_f">
                        <?php foreach($video_commend as $row):?>
                    	<li>
                        	<div class="c_img"><?php echo CHtml::link(Tool::thumb($row->zne_thumb,115,92, $row->zne_short), array('/home/news/video_detail', 'id'=>$row->zne_id), array('target'=>'_blank'))?></div>
                            <p class="title t_c"><?php echo CHtml::link($row->zne_short,array('/home/news/video_detail', 'id'=>$row->zne_id), array('target'=>'_blank'));?></p>
                        </li>
                        <?php endforeach;?>
                    </ul>
                    <ul class="news_li">
                        <?php foreach($video as $row):?>
                    	<li><?php echo CHtml::link($row->zne_short,array('/home/news/video_detail', 'id'=>$row->zne_id), array('target'=>'_blank'));?></li>
                        <?php endforeach;?>
                    </ul>
                </div>
            </div>
			<!-- 精彩视频栏目下C 广告位  250*100 start -->
			<div class="ad mt10">
				<?php $adzone = Adzone::model()->getData(62,$cid=0);
                    foreach( (array)$adzone['ads'] as $key=>$value){?>
                    <?php echo CHtml::link(CHtml::image($value['zds_file_url'],$value['zdz_desc'],array('height'=>$adzone['zdz_height'],'width'=>$adzone['zdz_width'])),$value['zds_url'],array('target'=>'_blank'))?>
                <?php }?>
			</div>
			<!-- 广告位 end -->
        </div>
        <!--精彩专题/视频 end-->
    </div>
	<!-- 最新图集上方横广告D 广告位  960*90 start -->
	<div class="ad mt10">
		<?php $adzone = Adzone::model()->getData(63,$cid=0);
			foreach( (array)$adzone['ads'] as $key=>$value){?>
			<?php echo CHtml::link(CHtml::image($value['zds_file_url'],$value['zdz_desc'],array('height'=>$adzone['zdz_height'],'width'=>$adzone['zdz_width'])),$value['zds_url'],array('target'=>'_blank'))?>
		<?php }?>
	</div>
	<!-- 广告位 end -->
    <!--最新图集 start-->
    <div class="album mt10">
    	<div class="hd c_f"><?php echo CHtml::link('更多>>', array('/home/news/album'), array('class' => 'more_txt f_r c_666'));?><h2 class="c_666 ff_yh fs_16">最新图集</h2></div>
        <div class="bd">
        	<ul class="c_f">
                <?php foreach($photo as $key=>$row):?>
            	<li class="item <?php if($key == 3){echo'no_br';}?>">
                	<h3 class="c_666 ff_yh"><?php echo $row->zne_short;?></h3>
                    <ul class="album_list c_f">
                        <?php
                            $zne_photo = unserialize($row->zne_photo);
                            if(count($zne_photo)>9)
								$zne_photo = array_slice(($zne_photo),0,9);
                            if(!empty($zne_photo)){foreach($zne_photo as $val):
                        ?>
                    	    <li><div class="c_img c_img70"><?php echo CHtml::link(Tool::thumb($val,70,70), array('/home/news/album_detail', 'id'=>$row->zne_id), array('target'=>'_blank'));?></div></li>
                        <?php endforeach;}?>
                    </ul>
                    <div class="from"><?php echo CHtml::link('去看看', array('/home/news/album_detail', 'id'=>$row->zne_id), array('class' => 'c_blue3 f_r','title' => '去看看'));?><span class="c_666">来自：<?php echo $row->zne_source;?></span></div>
                </li>
                <?php endforeach;?>
            </ul>
        </div>
    </div>
    <!--最新图集 end-->
    <!--热销产品推荐 start-->
    <div class="pro_recommend mt10">
    	<div class="hd"><h2 class="c_666 ff_yh fs_16">热销产品推荐</h2></div>
        <div class="bd pro_list bg_fff">
        	<ul class="c_f">
                <?php
                $sql = new CDbCriteria(array(
                    'condition' => 'zp_status = 2 AND zp_state = 2 ',
                    'limit' => '6',
                    'order' => 'zp_sale_num DESC'
                ));
                $hotpro = Product::model()->findAll($sql);
                if ($hotpro) {
                    foreach ($hotpro as $i) {
                ?>
            	<li class="item">
                    <div class="c_img c_img140"><?php echo CHtml::link( Tool::thumb( $i->zp_pic,140,140,$i->zp_name ),array('/home/product/detail/', 'id'=>$i->zp_id ),array('target'=>'_blank','title'=>$i->zp_name) ) ?></div>
                    <p class="price ff_yh"><strong class="fs_15 c_orange f_r">&yen;<?php echo $i->zp_price ?></strong><del class="c_999">&yen;<?php echo $i->zp_saleprice;?></del></p>
                    <p class="title c_666"><?php echo CHtml::link($i->getTitle(), array('/home/product/detail', 'id' => $i->zp_id))?></p>
                    <p class="buy"><?php echo CHtml::link('点击购买', array('/home/product/detail', 'id' => $i->zp_id), array('title' => '点击购买','class' => 'btn btn_buy'))?></p>
                </li>
                <?php
                    }
                } else {
                    ?>
                    <p style="text-align:center">没有找到商品!</p>
                <?php } ?>
            </ul>
        </div>
    </div>
    <!--热销产品推荐 end-->
</div>


